package com.blb.ioc.demo1;

public class ComputerTest {

    public static void main(String[] args) {
        //创建电脑对象
        Computer computer = new Computer();
        //设置属性
        Cpu cpu = new AmdCpu();
        Memory memory = new SumsungMemory();
        computer.setBrand("华为");
        computer.setCpu(cpu);
        computer.setMemory(memory);
        //启动
        computer.start();
    }
}
